<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>flex布局的方向</title>
    <style>
        .parent{
            display: flex;
            width: 400px;
            height: 400px;
            background: red;
            flex-direction: column;
            /* 
            flex-direction:
            如果flex布局的方向设置为column(列)
            justify-content:设置垂直方向
            align-items:设置水平方向
             */
            justify-content: center; 
            align-items: center;
        }
        .parent>div{
            width: 100px;
            height: 40px;
            border: 1px solid #333;
        }
    </style>
</head>
<body>
   <div class="parent">
       <div></div>
       <div></div>
       <div></div>
   </div>
</body>
</html>